package com.cn.JUC.utils.case10;

import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;

/**
 * @Title 执行完，交给T1Task
 * @Description T2Task需要执行的任务:洗茶壶、洗茶杯、拿茶叶
 * @Author CAI ZHAI
 * @Date 2021/9/6 16:08
 **/
class T2Task implements Callable<String>{
    @Override
    public String call() throws Exception {
        System.out.println("T2:洗茶壶...");
        TimeUnit.SECONDS.sleep(1);
        
        System.out.println("T2:洗茶杯...");
        TimeUnit.SECONDS.sleep(2);
        
        System.out.println("T2:拿茶叶...");
        TimeUnit.SECONDS.sleep(1);
        return "龙井";
    }
}
